﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RetrievePassword.aspx.cs" Inherits="lgweb.user.RetrievePassword" %>

<%@ Register Src="~/control/header.ascx" TagName="header" TagPrefix="uc1" %>
<%@ Register Src="~/control/footer.ascx" TagName="footer" TagPrefix="uc2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>找回密码 - 当事人通道 - 深圳市龙岗区人民法院网站</title>
    <meta content="龙岗区人民法院,深圳市龙岗区人民法院网站" name="keywords" />
    <meta content="龙岗区人民法院,深圳市龙岗区人民法院网站" name="description" />
    <link href="/favicon.ico" type="image/x-icon" rel="Bookmark" />
    <link href="/favicon.ico" type="image/x-icon" rel="shortcut icon" />
    <link href="/css/base.css" rel="stylesheet" type="text/css" />
    <link href="/css/user/user.css" rel="stylesheet" type="text/css" />
    <script src="/js/common/base.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="g_body">
        <uc1:header ID="header1" runat="server" />
        <div class="g_content">
             <div class="g_box950">
                <div class="s_title">当前位置：<a href="/index.aspx">首页</a> > 用户登录</div>
                <div class="s_box">
                    <div class="g-hspace20"></div>
                    <table cellpadding="0" cellspacing="0" class="g_detail clear" id="tbl_one">
                        <tr>
                            <th width="180">证件类型：</th>
                            <td width="250"><input type="radio" name="rdoactivation" checked="checked" id="rdoActivation1" runat="server"  />身份证<input type="radio" class="mgl10" name="rdoactivation"  id="rdoActivation2" runat="server" />护照</td>
                        </tr>
                        <tr>
                            <th width="180">证件号码：</th>
                            <td><input type="text" value="" class="txt w160" id="txtidentityCard" runat="server" /></td>
                        </tr>
                        <tr>
                            <td width="180"></td>
                            <td><input type="button" value="找回密码" onclick="Retrieve_table();"  /></td>
                        </tr>
                    </table>
                    <div class="g-hspace20"></div>
                    <table cellpadding="0" cellspacing="0" class="g_detail clear none" id="tbl_two">
                        <tr>
                            <th width="180">输入手机验证码：</th>
                            <td width="250"><input type="text" value="" class="txt w160" id="txtMoblie" runat="server" /></td>
                        </tr>
                        <tr>
                            <th width="180">新密码：</th>
                            <td><input type="password" value="" class="txt w160" id="txtPassword" runat="server" /></td>
                        </tr>
                        <tr>
                            <th width="180">重复新密码：</th>
                            <td><input type="password" value="" class="txt w160" id="txtcomfrimPassword" runat="server" /></td>
                        </tr>
                        <tr>
                            <td width="180"></td>
                            <td><asp:Button ID="Button1" runat="server" onclick="Button1_Click" OnClientClick="return CheckPassword();" Text="设置新密码" /><input type="button" value="取消" class="mgl10"  />
                            </td>
                        </tr>
                    </table>   
                    <div id="divMessages" runat="server" class="red"></div>
                    <div class="g-hspace20"></div> 
                </div>
                <div class="s_ft"></div>
            </div>
        </div>
        <uc2:footer ID="footer1" runat="server" />
    </div>
    </form>
</body>
</html>
<script type="text/javascript">
    function Retrieve_table() {
        var sIdentityCard = document.getElementById("txtidentityCard").value;
        if (sIdentityCard.length <= 0) {
            alert("证件号码不能为空！");
            return false;
        } else {
            document.getElementById("tbl_one").className = "g_detail clear none";
            document.getElementById("tbl_two").className = "g_detail clear";
        }
    }

    function CheckPassword() {
        var sPassword = document.getElementById("txtPassword").value;
        var re1 = /^^[a-zA-Z0-9\-]{5,15}$|^[a-zA-Z0-9\-]{5,15}\.[a-zA-Z0-9\-]{5,15}$/;
        if (!re1.test(sPassword)) {
            alert("密码必须为大于5小于15个字符.不能使用特殊字符！");
            return false;
        }

        var sConfrimPassword = document.getElementById("txtcomfrimPassword").value;
        var re2 = /^^[a-zA-Z0-9\-]{5,15}$|^[a-zA-Z0-9\-]{5,15}\.[a-zA-Z0-9\-]{5,15}$/;
        if (!re2.test(sConfrimPassword)) {
            alert("重新输入密码必须大于5小于15个字符.不能使用特殊字符！");
            return false;
        }

        if (sPassword != sConfrimPassword) {
            alert("密码不一致，请检查二次密码是否输入一致！");
            return false;
        }
        return true;
    }

</script>